<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>欢迎{{ request.session.name }}</h1>
<table>
    <a href="{% url 'add' %}">增加</a>
    {% for all in alls %}
        <tr>
            <td>{{ forloop.counter }}</td>
            <td>{{ all.tit }}</td>
            <td>{{ all.ath }}</td>
            <td>{{ all.cont }}</td>
            <td>{{ all.dataa|date:'Y-m-d' }}</td>
            <td>{% if all.bn == 1 %}
                已审核
            {% else %}
                未审核
            {% endif %} </td>
            <td>{{ all.Type.tname }}</td>
            <td><a href="{% url 'delete' id=all.id %} " onclick="return a()">删除</a></td>
            <td><a href="{% url 'update' id=all.id tid=all.Type.id %}">修改</a></td>
        </tr>
    {% endfor %}
    <script>
        function a() {
            if (confirm('确认删除吗')){
                return true
            }else {
                return false
            }
        }
    </script>
</table>
</body>
</html>